<!doctype html>
<html>

<head>
  <title>苏宁易购粉狮节</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"
  />
  <meta http-equiv="Cache-Control" content="max-age=0" />
  <meta http-equiv="Access-Control-Allow-Origin" content="http://app.cnzhuoyue.net/20180226_suning/Index/index_act.html" />
  <meta name="apple-touch-fullscreen" content="yes" />
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  <link rel="stylesheet" href="http://app.cnzhuoyue.net/20180226_suning/Public/css/swiper-3.4.2.min.css?v=136435" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/css/swiper-3.4.2.min.css?v=136435"
    type="text/css" />
  <link rel="stylesheet" href="base.css" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/css/base.css?v=5" type="text/css"
  />
</head>

<body>
  <div id="load">
    <div class="loader">
      <img src="logo.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/logo.png" alt="" class="logo">
      <img src="load_txt.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/load_txt.png" alt="" class="load_txt">
      <div class="loader5">
        <div class="loader5_con">
          <img src="loading_logo.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/loading_logo.png" alt="">
          <div class="loader_n">
            <img src="n_line.gif" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/n_line.gif" alt="">
            <div class="loader_n_con"></div>
          </div>
        </div>
      </div>
      <img src="load_txt1.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/load_txt1.png" alt="" class="load_txt1">
    </div>
    <div class="load_img">
      LOADING
      <span></span>
      <span></span>
      <span></span>
    </div>
  </div>
  <div class="p1">
    <div class="swiper-container">
      <div class="swiper-wrapper">
        <section class="swiper-slide swiper-slide1">
          <img src="slider1.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/slider1.png" alt="" class="slide_img">
        </section>
        <section class="swiper-slide swiper-slide2">
          <img src="slider2.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/slider2.png" alt="" class="slide_img">
        </section>
        <section class="swiper-slide swiper-slide3">
          <img src="slider3.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/slider3.png" alt="" class="slide_img">
        </section>
        <section class="swiper-slide swiper-slide4">
          <img src="slider4.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/slider4.png" alt="" class="slide_img">
        </section>
        <section class="swiper-slide swiper-slide5">
          <img src="slider6.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/slider6.png" alt="" class="slide_img">

        </section>
        <section class="swiper-slide swiper-slide6">
          <img src="slider5.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/slider5.png" alt="" class="slide_img">
        </section>
        <section class="swiper-slide swiper-slide7" data-src="#fcc700">
          <img src="shu_title.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/shu_title.png" alt="" class="shu_title">
          <div class="shu">
            <div class="shu_con">
              <img src="bi.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/bi.png" alt="" class="bi">
              <div class="shu_input">
                <span><input type="text" class="input_1" placeholder="点击文字下划线编辑内容..." maxlength="8"></span>
                <span><input type="text" class="input_2" maxlength="8" placeholder="每行字数不得超过8个..."></span>
                <span><input type="text" class="input_3" maxlength="8"></span>
                <span><input type="text" class="input_4" maxlength="8"></span>
                <span><input type="text" class="input_5" maxlength="8"></span>
              </div>
              <img src="fen.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/fen.png" alt="" class="fen">
              <div class="user_n"><i>我是</i><span class="u_name"><input type="text" class="name" maxlength="6" value=""></span></div>
            </div>
          </div>
          <div class="shu_color">
            <!-- <div class="js_showBox "><img class="js_logoBox" src="" width="100px"></div>-->
            <span><img src="blue.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/blue.png" alt="" class="color" data-color="#6badff"></span>
            <span><img src="green.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/green.png" alt="" class="color" data-color="#93e513"></span>
            <span><img src="purple.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/purple.png" alt="" class="color" data-color="#b57cfb"></span>
            <span><img src="orange.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/orange.png" alt="" class="color" data-color="#fcc700"></span>
            <span><img src="red.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/red.png" alt="" class="color" data-color="#ff5151"></span>
            <span class="last_span">
              <img src="file_up.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/file_up.png" alt="">
              <i>
                <input id="upload_1" name="file_upload" type="file" multiple="true"/>
              </i>
            </span>
          </div>
          <div id="queue" style="display: none;"></div>
          <div class="sucess_btn">
            <img src="yulan_btn.png" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/yulan_btn.png" alt="" class="yulan_btn">
          </div>
        </section>
      </div>
      <div class="swiper-button-next"></div>
      <div class="swiper-button-prev"></div>
      <div class="swiper-pagination"></div>
    </div>
  </div>
  <!--音乐-->
  <div id="audio_btn" class="video_exist play_yinfu" style="display: block;">
    <div id="yinfu" class="rotate"></div>
    <audio src="./music.mp3" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/img/music.mp3" loop="" autoplay="" id="music"></audio>
  </div>
  <script src="jquery.min.js" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/js/jquery.min.js"></script>
  <script src="music.js-v=111.js" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/js/music.js?v=111"></script>
  <script src="http://app.cnzhuoyue.net/20180226_suning/Public/js/swiper-3.4.2.min.js?v=12231" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/js/swiper-3.4.2.min.js?v=12231"></script>
  <script src="common.js-v=11.js" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/js/common.js?v=11"></script>
  <!--uploadify-->
  <script src="jquery.uploadifive.min.js" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/uploadifive/jquery.uploadifive.min.js"
    type="text/javascript"></script>
  <script src="jquery.json-2.3.min.js" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/uploadifive/jquery.json-2.3.min.js"
    type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="uploadifive.css" tppabs="http://app.cnzhuoyue.net/20180226_suning/Public/uploadifive/uploadifive.css"
  />
  <script type="text/javascript">
    var filePath;
    var file ;
    var overscroll = function (el) {
      el.addEventListener('touchstart', function () {
        var top = el.scrollTop
          , totalScroll = el.scrollHeight
          , currentScroll = top + el.offsetHeight;
        //If we're at the top or the bottom of the containers
        //scroll, push up or down one pixel.
        //
        //this prevents the scroll from "passing through" to
        //the body.
        if (top === 0) {
          el.scrollTop = 1;
        } else if (currentScroll === totalScroll) {
          el.scrollTop = top - 1;
        }
      });
      el.addEventListener('touchmove', function (evt) {
        //if the content is actually scrollable, i.e. the content is long enough
        //that scrolling can occur
        if (el.offsetHeight < el.scrollHeight)
          evt._isScroller = true;
      });
    }
    overscroll(document.querySelector('body'));
    document.body.addEventListener('touchmove', function (evt) {
      //In this case, the default behavior is scrolling the body, which
      //would result in an overflow.  Since we don't want that, we preventDefault.
      if (!evt._isScroller) {
        evt.preventDefault();
      }
    });
    $(function () {
      // var height = $(window).height();
      // $('#upload_1').uploadifive({
      //   'buttonText': '选择图片',
      //   'width': '100%',
      //   'height': '100%',
      //   'auto': true,
      //   'fileType': ['image/png', 'image/jpeg'],
      //   'fileSizeLimit': 10000,//10M
      //   'multi': false,
      //   'uploadLimit': 1,//每次上传的数量
      //   'formData': { 'path': 'images' },
      //   'queueID': 'queue',
      //   'removeCompleted': true,
      //   'uploadScript': '/20180226_suning/Home/File/upload',
      //   'onUploadComplete': function (file, data) {
      //     var d = $.evalJSON(data);
      //     alert('data:'+data);
      //     $('.swiper-slide7').data('src', d.name);
      //     $('.swiper-slide7').css({ 'background': 'url(' + d.name + ') no-repeat left top', 'background-size': '100% ' + height + 'px' });
      //     toast('图片上传成功');
      //   }
      // });
      $('#upload_1').on('change', function () {
        filePath = $(this).val();       //获取到input的value，里面是文件的路径
        var height = $(window).height(),
          fileFormat = filePath.substring(filePath.lastIndexOf(".")).toLowerCase(),
          file = this.files[0],
          src = getObjectURL(this.files[0]); //转成可以在本地预览的格式  
        // 检查是否是图片  
        if (!fileFormat.match(/.png|.jpg|.jpeg/)) {
          // error_prompt_alert('上传错误,文件格式必须为：png/jpg/jpeg');
          toast('上传错误,文件格式必须为：png/jpg/jpeg');
          return;
        }
        toast('图片上传成功');
        console.log(file);
        $('.swiper-slide7').data('src', src);
        $('.swiper-slide7').css({ 'background': 'url(' + src + ') no-repeat left top', 'background-size': '100% ' + height + 'px' });
        //自定义获取图片路径函数
        function getObjectURL(file) {
          var url = null;
          if (window.createObjectURL != undefined) { // basic
            url = window.createObjectURL(file);
          } else if (window.URL != undefined) { // mozilla(firefox)
            url = window.URL.createObjectURL(file);
          } else if (window.webkitURL != undefined) { // webkit or chrome
            url = window.webkitURL.createObjectURL(file);
          }
          return url;
        }
      });

    });
  </script>
  <!--//uploadify-->
  <script>
    var number = 0;
    var mySwiper = new Swiper('.swiper-container', {
      direction: 'horizontal',
      prevButton: '.swiper-button-prev',
      nextButton: '.swiper-button-next',
      pagination: '.swiper-pagination',
      onReachEnd: function (swiper) {
        // alert('到了最后一个slide');
        $('.swiper-pagination').hide();
        $('.swiper-button-next').hide();
        $('.swiper-button-prev').hide();
      },
      onSlidePrevStart: function (swiper) {
        //alert('事件触发了;');
        $('.swiper-pagination').show();
        $('.swiper-button-next').show();
        $('.swiper-button-prev').show();
      },
    })
    $(function () {
      $('.yulan_btn').click(function () {
        number++;
        var bgi = $('.swiper-slide7').data('src');
        var input_1 = $('.input_1').val();
        var input_2 = $('.input_2').val();
        var input_3 = $('.input_3').val();
        var input_4 = $('.input_4').val();
        var input_5 = $('.input_5').val();
        //至少书写一行
        if (input_1 == '' && input_2 == '' && input_3 == '' && input_4 == '' && input_5 == '') {
          toast('请至少书写一行');
          return false;
        }
        var name = $('.name').val();
        if (name == '') {
          toast('请输入您的姓名');
          return false;
        }
        $.ajax({
          type: "POST",
          dataType: "jsonp",
          url: "http://app.cnzhuoyue.net/20180226_suning/Index/index_act.html",
          data: {
            bgi: bgi,
            input_1: input_1,
            input_2: input_2,
            input_3: input_3,
            input_4: input_4,
            input_5: input_5,
            name: name
          },
          success: function (data) {
            if (data != 0) {
              window.location.href = "http://baidu.com";
              //window.location.href="http://app.cnzhuoyue.net/20180226_suning/Index/page.html?id"+'?id='+data;
            }
          },
          error: function () {
            var href = encodeURI("./page.html?input_1=" + input_1 + "&input_2=" + input_2 + "&input_3=" + input_3 + "&input_4=" + input_4 + "&input_5=" + input_5 + "&name=" + name + "&file=" + file);
            window.location.href = href;
          }
        })
      })
    })
  </script>
  <script src="jweixin-1.2.0.js" tppabs="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
  <script>
    wx.config({
      debug: false,
      appId: 'wxaadc77991abf6643',
      timestamp: 1521640633,
      nonceStr: 'WHvmr6yEb9r25yyu',
      signature: '00ae2579dccc901118dc355f948bc7ac278761aa',
      jsApiList: [
        'checkJsApi',
        'onMenuShareTimeline',
        'onMenuShareAppMessage',
        'onMenuShareQQ',
        'onMenuShareWeibo',
        'onMenuShareQZone',
        'hideMenuItems',
        'showMenuItems',
        'hideAllNonBaseMenuItem',
        'showAllNonBaseMenuItem',
        'translateVoice',
        'startRecord',
        'stopRecord',
        'onVoiceRecordEnd',
        'playVoice',
        'onVoicePlayEnd',
        'pauseVoice',
        'stopVoice',
        'uploadVoice',
        'downloadVoice',
        'chooseImage',
        'previewImage',
        'uploadImage',
        'downloadImage',
        'getNetworkType',
        'openLocation',
        'getLocation',
        'hideOptionMenu',
        'showOptionMenu',
        'closeWindow',
        'scanQRCode',
        'chooseWXPay',
        'openProductSpecificView',
        'addCard',
        'chooseCard',
        'openCard'
      ]
    });
    wx.ready(function () {
      wx.onMenuShareTimeline({
        title: '【3.09粉狮节】互粉全世界', // 分享标题
        link: 'http://app.cnzhuoyue.net/20180226_suning/index/index.htm'/*tpa=http://app.cnzhuoyue.net/20180226_suning/index/*/, // 分享链接
        imgUrl: 'http://app.cnzhuoyue.net/20180226_suning/Public/img/wxshare1.jpg'/*tpa=http://app.cnzhuoyue.net/20180226_suning/Public/img/wxshare1.jpg*/,
        success: function () {
          alert('分享成功');
        },
        cancel: function () {
          alert('取消分享');
        }
      });
      wx.onMenuShareAppMessage({
        title: '【3.09粉狮节】互粉全世界', // 分享标题 
        desc: '给世界一个粉你的理由', // 分享描述
        link: 'http://app.cnzhuoyue.net/20180226_suning/index/'/*tpa=http://app.cnzhuoyue.net/20180226_suning/index/*/, // 分享链接
        imgUrl: 'http://app.cnzhuoyue.net/20180226_suning/Public/img/wxshare1.jpg'/*tpa=http://app.cnzhuoyue.net/20180226_suning/Public/img/wxshare1.jpg*/,
        success: function () {
          alert('分享成功');
        },
        cancel: function () {
          alert('取消分享');
        }
      });
    })
  </script>
  <div style="display:none;">
    <script>
      var _hmt = _hmt || [];
      (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?41293592228781ee1cbe42463be74e37"/*tpa=https://hm.baidu.com/hm.js?41293592228781ee1cbe42463be74e37*/;
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
  </div>
</body>

</html>